package com.jiang;

import com.jiang.service.BookServce;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppForDI {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        BookServce bookService = (BookServce) applicationContext.getBean("bookService");
        bookService.save();
    }
}
